In order to attach an electric device to a rail, a structure has been proposed in which a fixing claw is integrally formed on one side of the bottom of a housing of the electric device, a movable claw removably engaged to the side surface of the housing is provided at a position facing the fixing claw of the bottom of the housing, wherein the fixing claw is engaged to one edge of the rail, and the movable claw is engaged to the other edge of the rail, thereby attaching the electric device to the rail (for example, Patent Document 1).